<!DOCTYPE html>
<html>
	<head>
		<title>Login</title>
			<link rel="stylesheet"type="text/css"href="css/Login.css"/>
		<script type="text/javascript">
		function validateForm()
		{
			if(!checkName(myForm.myName.value))return false;
			if(!checkNum(myForm.myNumber.value))return false;
			return ture;
		}
		function checkName(s)
		{
			var ok=(s.length>0);
			if(!ok)alert("登陆名输入有误，请查核！")
			return ok;
		}
		function checkNum(n)
		{
			var ok,i,ch;
			for(i=0;i<6;i++)
			{
				ch=n.charAt(i);
				if(ch>"9"||ch<"0")
				{
					alert("<"+n+">密码输入有误，请查核！");
					return false;
				}
			}
			return ture;
		}
	</script>
	</head>
	<body>
<div class="login-box">
		<h2>Login</h2>
		<form name="myForm"onsubmit="return validateForm();"action="javascript:alert('登陆成功！')">
			<div class="login-field">
				<input type="text" name="myName" required=""/>
				<label>用户名：</label>
			</div>
			<div class="login-field">
				<input type="password" name="myNumber" required=""/>
				<label>密码：</label>
			</div>
			<button type="submit" name="">登陆</button>
		</form>
		<p><a href="tiaoshi.html" target="_blank">返回</a></p>
	</div>
</body>
</html>